package com.kmxd.ams.client.logs.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 条目检索日志表
 *
 * @author nickbi
 * @since 2022-12-23
 */
@Data
@ColumnWidth(15)
@HeadRowHeight(15)
@ContentRowHeight(15)
@HeadStyle
@HeadFontStyle(fontHeightInPoints = 12)
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
@ContentFontStyle(fontHeightInPoints = 10)
@ExcelIgnoreUnannotated
@Schema(description = "条目检索日志表对象")
public class LogSearchListVO implements Serializable {

  private static final long serialVersionUID = 1L;

  @Schema(description = "主键ID")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "主键ID")
  private Long id;

  @Schema(description = "公司ID")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "公司ID")
  private Long comId;

  @Schema(description = "全宗ID")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "全宗ID")
  private Long fondsId;

  @Schema(description = "部门ID")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "部门ID")
  private Long deptId;

  @Schema(description = "部门名称")
  @ExcelProperty(value = "部门名称")
  private String deptName;

  @Schema(description = "检索人IP")
  @ExcelProperty(value = "检索人IP")
  private String ip;

  @Schema(description = "用户id")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "用户id")
  private Long userId;

  @Schema(description = "登录人代码")
  @ExcelProperty(value = "登录人代码")
  private String userCode;

  @Schema(description = "登录人名称")
  @ExcelProperty(value = "登录人名称")
  private String userName;

  @Schema(description = "档案门类ID")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "档案门类ID")
  private Long archTypeId;

  @Schema(description = "档案门类名称")
  @ExcelProperty(value = "档案门类名称")
  private String archTypeName;

  @Schema(description = "检索表名")
  @ExcelProperty(value = "检索表名")
  private String tableId;

  @Schema(description = "档案状态")
  @ExcelProperty(value = "档案状态")
  private Integer status;

  @Schema(description = "检索类别：1快速检测,2高级检索,3卡片检索,4目录检索,5专题浏览")
  @ExcelProperty(value = "检索类别：1快速检测,2高级检索,3卡片检索,4目录检索,5专题浏览")
  private Integer type;

  @Schema(description = "查询条件")
  @ExcelProperty(value = "查询条件")
  private String searchCondition;

  @Schema(description = "日志安全等级：0低，1中，2高，3高危")
  @ExcelProperty(value = "日志安全等级：0低，1中，2高，3高危")
  private Integer level;

  @Schema(description = "备注")
  @ExcelProperty(value = "备注")
  private String remarks;

  @Schema(description = "操作时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @ColumnWidth(20)
  @ExcelProperty(value = "操作时间")
  private Date createTime;
}
